<template>
	<div class="page">
		<p class="title">基本用法</p>
		<gr-button @click="open()">默认遮罩</gr-button>
		<gr-button @click="open(true)">黑色遮罩</gr-button>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		mounted() {
			
		},
		methods: {
			open(dark) {
				const cLoading = this.$loading({
					'text': '加载中呢',
					'dark': dark
				});
				setTimeout(()=>{
					cLoading.close();
				}, 2000)
			}
		}
	}
</script>

<style lang="scss">
	.page {
		padding: 0 10px;
	}
</style>
